package models

import "time"

// Tag 标签表
type Tag struct {
	ID           uint64    `gorm:"primaryKey;comment:标签ID"`
	Name         string    `gorm:"type:varchar(30);not null;uniqueIndex;comment:标签名称"`
	ArticleCount uint      `gorm:"default:0;index;comment:使用次数"`
	CreatedAt    time.Time `gorm:"autoCreateTime;comment:创建时间"`
	UpdatedAt    time.Time `gorm:"autoUpdateTime;comment:更新时间"`
}

func (Tag) TableName() string {
	return "tags"
}
